﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BallData
{
    public class OddsChg
    {
        
        public String mId;
        public String cId;
        public String oType;
        // 赔率序号比如 亚盘1，亚盘2
        public String sId;
        public Int32 chgTimeUTC;
        public DateTime chgTime;
        public String host;
        public String vs;
        public String visit;
        public OddsChg(String infoStr)
        {
            String[] infoArr = infoStr.Split(OddsUntil.SplitColumn);
            this.mId = infoArr[0];
            this.cId = infoArr[1];
            this.oType = infoArr[2];
            this.sId = infoArr[3];
            this.chgTimeUTC = Convert.ToInt32(infoArr[4], 10);
            this.chgTime = OddsUntil.ConvertIntDateTime(this.chgTimeUTC);
            this.host = infoArr[5];
            this.vs = infoArr[6];
            this.visit = infoArr[7];



        }
        public String getOdds (int idx) 
        {
            if(idx==1) 
                return this.host;
            else if(idx==2) 
                return this.vs;
            else if(idx==3) 
                return this.visit;
            return "";
        }
    }
}
